package liwenxia.com.tree_learn.demo1;

/**
 * 二叉树数据结构
 */

 //TreeNode 常用的一个结构体
public   class TreeNode {
    public   int  key;
    public    int value;

    public   TreeNode left;
    public   TreeNode right;
    public TreeNode() {

    }

    public TreeNode(int key,int value) {
        this.key = key;
        this.value = value;
    }

    //构造函数
    public TreeNode(TreeNode left, TreeNode right) {
        this.left = left;
        this.right = right;
    }

    public int setValue(int value) {
        return this.value;
    }
}